package www.ld.com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import www.ld.com.entities.Dept;
import www.ld.com.service.IDeptService;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private IDeptService deptService;

    @GetMapping("/findAll")
    public List<Dept> findAll(){
         return deptService.findAll();
    }
    @GetMapping("test")
    public String test(){
        return "成功";
    }
}
